﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Update.aspx.cs" Inherits="Update" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title id="title" runat="server"></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>

    <h2>Subscription details</h2>
    <a href="Subscriptions.aspx">Subscriptions</a>

    <table>
    <tr>
    <td>Subscription Id</td>
    <td runat="server" id="c_subscriptionIdText" />
    </tr>
    <tr>
    <td>Type</td>
    <td runat="server" id="c_subscriptionType" />
    </tr>    
    <tr>
    <td>Notification Url</td>
    <td><asp:TextBox ID="c_textboxUrl" runat="server" Columns="100" /></td>
    </tr>    
    <tr>
    <td>NotificationKey</td>
    <td runat="server" id="c_notificationKey" />
    </tr>    
    <tr>
    <td>NotificationKeyVersionId</td>
    <td><asp:TextBox ID="c_notificationVersionId" runat="server" Columns="100" /></td>
    </tr>    

    <tr><td colspan="2">
    <asp:Button ID="c_buttonSave" runat="server" Text="Save notification url and version id" OnClick="urlChanged" />
    </td></tr>
    <tr><td>&nbsp;</td></tr>
   
<asp:Repeater runat="server" ID="_DataTypeTable">
<HeaderTemplate>
<table cellpadding="2" cellspacing="2" border="1">
<tr>
<th>&nbsp;</th>
<th>Type</th>
</tr>
</HeaderTemplate>

<ItemTemplate>
<tr>
<td>
<asp:LinkButton 
    ID="linkDelete" 
    runat="server" 
    OnCommand="linkDeleteClick" 
    CommandArgument='<%# Container.DataItem.ToString() %>'>X</asp:LinkButton>
</td>
<td>
    <%# Microsoft.Health.ItemTypeManager.GetRegisteredTypeForTypeId((Guid) Container.DataItem).Name %>
</td>
</tr>
</ItemTemplate>


<FooterTemplate>
</table>
</FooterTemplate>

</asp:Repeater>
<br />

        <asp:Label ID="Label1" runat="server" Text="Label">Types</asp:Label>
        <asp:DropDownList ID="c_AllTypes" runat="server">
        </asp:DropDownList>

        <asp:Button ID="c_ButtonAdd" runat="server" Text="Add Type" OnClick="addClick" />
        <br /> <br />

        <asp:HyperLink ID="c_linkText" runat="server" >Test this subscription</asp:HyperLink>
    </div>

    </form>
</body>
</html>
